Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MFA with backup codes #269

Merged
merged 12 commits into from
Sep 4, 2024
Merged

Support MFA with backup codes #269

merged 12 commits into from
Sep 4, 2024

Conversation

natalian98
Copy link
Contributor

@natalian98 natalian98 commented Aug 28, 2024

This PR adds support for lookup secrets (backup codes) as a fallback method for TOTP multi-factor auth.


Setting up the codes (/ui/setup_backup_codes):
image
image
Print/download:
image
image

image

Sign in with a backup code:
image
image
Error messages:
image
If user logged in using a backup code and has 3 or less of them left, the following screen will be displayed, offering to generate a new set:
image

@natalian98 natalian98 marked this pull request as ready for review August 28, 2024 12:40
@natalian98 natalian98 requested a review from a team as a code owner August 28, 2024 12:40
@natalian98 natalian98 changed the title Iam 929 lookup secrets Support MFA with backup codes Aug 29, 2024
Copy link
Contributor

@BarcoMasile BarcoMasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work overall, some suggestions

pkg/kratos/handlers.go Outdated Show resolved Hide resolved
pkg/kratos/service.go Outdated Show resolved Hide resolved
pkg/kratos/service.go Show resolved Hide resolved
pkg/kratos/service.go Outdated Show resolved Hide resolved
ui/components/Flow.tsx Outdated Show resolved Hide resolved
ui/components/NodeInputSubmit.tsx Outdated Show resolved Hide resolved
ui/components/NodeText.tsx Outdated Show resolved Hide resolved
ui/components/NodeText.tsx Outdated Show resolved Hide resolved
@natalian98 natalian98 requested a review from a team August 29, 2024 10:03
Copy link
Contributor

@nsklikas nsklikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks fine (didn't look to much into the frontend), but I have a some questions and some nit-picks

pkg/kratos/handlers.go Outdated Show resolved Hide resolved
pkg/kratos/handlers.go Outdated Show resolved Hide resolved
pkg/kratos/handlers.go Outdated Show resolved Hide resolved
pkg/kratos/handlers.go Show resolved Hide resolved
BarcoMasile
BarcoMasile previously approved these changes Aug 30, 2024
Copy link
Contributor

@BarcoMasile BarcoMasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve so we can merge, there are still a few inline labmdas to swtich to the useCallback approach, but that'll be at a different time
Thank you

nsklikas
nsklikas previously approved these changes Sep 2, 2024
pkg/kratos/handlers.go Show resolved Hide resolved
pkg/kratos/handlers.go Show resolved Hide resolved
pkg/kratos/service.go Show resolved Hide resolved
pkg/kratos/handlers.go Show resolved Hide resolved
natalian98 and others added 12 commits September 3, 2024 12:55
…, regenerated and viewed

Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
Signed-off-by: David Edler <david.edler@canonical.com>
@natalian98 natalian98 merged commit f0163b3 into main Sep 4, 2024
6 checks passed
@natalian98 natalian98 deleted the IAM-929-lookup-secrets branch September 4, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants